package cn.zucc.edu.handyzucc.service.impl;

import cn.zucc.edu.handyzucc.dao.AdminDao;
import cn.zucc.edu.handyzucc.entity.Admin;
import cn.zucc.edu.handyzucc.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminDao adminDao;

    @Override
    public boolean login(String admin_username, String admin_password) {
        return adminDao.login(admin_username, admin_password) != null;
    }

    @Override
    public boolean signup(Admin admin) {
        return adminDao.signup(admin) == 1;
    }
}
